/*
 * Created on Jul 28, 2004
 *
 * TODO To change the template for this generated file go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
package com.ba360.portal.util;


import java.util.ResourceBundle;

import com.bitfactoryinc.logging.FileLogger;
import com.bitfactoryinc.logging.Logger;

/**
 * @author ROnat
 * 
 * TODO To change the template for this generated type comment go to Window -
 * Preferences - Java - Code Style - Code Templates
 */
public class Log {

	private static Logger logger = null;

	public static void init(Class thisClass) {
		ResourceBundle rb = ResourceBundle.getBundle("ApplicationResources");
		logger = new FileLogger(rb.getString("LogFile"));
		logger.setSeverityThreshold(Integer.parseInt(rb.getString("LogLevel")));
		//logger.logInfo("Test");
		//logger = Logger.getLogger(thisClass);
	}

	public static void info(String message) {
		logger.logInfo(message);
	}

	public static void warn(String message) {
		logger.logWarning(message);
	}

	public static void error(String message) {
		logger.logError(message);
	}

	public static void fatal(String message) {
		logger.logFatal(message);
	}

}